<template>
  <div class="recommend">
      <div v-for="(item,index) in recommend" class="recommend-item" :key="index">
        <a :href="item.link">
          <img :src="item.image" alt="">
        </a>
        <p>{{item.title}}</p>
      </div>
  </div>
</template>

<script>
  export default {
    name: "RecommendViews",
    props:{
      recommend:{
        type:Array,
        default() {
          return [];
        }
      }
    }
  }
</script>

<style scoped>
  .recommend{
    display: flex;
    width: 100%;
    text-align: center;
    padding: 10px 10px 20px;
    border-bottom: 8px solid #eeeeee;
  }
  .recommend-item{
    flex: 1;
    margin-right: 15px;
  }
  .recommend-item:last-child{
    margin-right: 0;
  }
  .recommend-item a{
    display: inline-block;
    width: 100%;
    height: auto;
    margin-bottom: 8px;
  }
  .recommend-item img{
    width: 100%;
    height: auto;
  }
  .recommend-item p{
    font-size: 14px;
  }
</style>
